<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@page import="com.AAL.Model.TransferingRequest"%>
<%@page import="com.AAL.Action.TransferRequestAction"%>
<%@page import="java.util.List"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@page import="com.AAL.Model.Account"%>

<script  type="text/javascript">
</script>
<h3
	style="background-color: #8AC0E9; font-size: 17px; width: 95%; padding: 10px; color: white;">Quản
lý yêu cầu điều phối hàng</h3>
<p style="clear: both;"></p>

<div style="margin: 10px;">
<fieldset style="width: 95%;">
<div class="type-text"> 
<s:form id="form11" method="post" cssClass="yform" theme="simple">
<fieldset style="width: 95%;">
<legend
	style="margin-left: 10px; font-weight: bold;">Nhập thông tin chung</legend>
	<ul class="form">		
		<li class="left">Ngày yêu cầu xử lý</li>
		<li class="right"><sj:datepicker label="Ngày yêu cầu"
				readonly="true" cssClass="smallInput wide"
				name="requirementDateInput" /></li>
		<li class="clr"></li>
		</ul>	
</fieldset>
<legend
	style="margin-left: 10px; font-weight: bold;">Danh sách số lượng sản phẩm <s:property
					value="wareHouseChose" /> cần nhập</legend>
	<p style="clear: both;"></p>				
<table width="95%" style="margin-left: 10px;" cellpadding="0"
	cellspacing="0" id="box-table-a" summary="Employee Pay Sheet">
	<thead>
		<tr>
			<th width="5%" scope="col">STT</th>
			<th width="7%" scope="col">Mã hàng</th>
			<th width="10%" scope="col">Loại lốp</th>
			<th width="10%" scope="col">Dòng xe</th>
			<th width="10%" scope="col">Số lượng yêu cầu</th>				
			
			<s:if test="%{wareHouseChose=='kho miền Bắc'}">
			<th width="10%" scope="col">Số lượng hiện có kho miền Trung</th>
			<th width="10%" scope="col">Số lượng hiện có kho miền Nam</th>
			<s:hidden name="toWareHouse" value="1"></s:hidden>
			</s:if>
			<s:if test="%{wareHouseChose=='kho miền Trung'}">
			<th width="10%" scope="col">Số lượng hiện có kho miền Bắc</th>
			<th width="10%" scope="col">Số lượng hiện có kho miền Nam</th>
			<s:hidden name="toWareHouse" value="2"></s:hidden>
			</s:if>
			<s:if test="%{wareHouseChose=='kho miền Nam'}">
			<th width="10%" scope="col">Số lượng hiện có kho miền Bắc</th>
			<th width="10%" scope="col">Số lượng hiện có kho miền Trung</th>
			<s:hidden name="toWareHouse" value="3"></s:hidden>
			</s:if>
			<th width="5%" scope="col">Chọn kho chuyển</th>
			<th width="5%" scope="col">Số lượng chuyển</th>	
		</tr>
	</thead>
	<tbody>
	<%int i=0; %>
		<s:iterator value="lstRequestingDetail" var="a">
		 <s:set name="wheelDetailIDRQ" value="%{wheelDetail.wheelDetailID}"/>	
		 <s:hidden name="wheelDetailIDRQ" value="%{wheelDetailIDRQ}"></s:hidden>	 
		<tr>
			<td><%i++; out.print(i);%></td>
			<td><s:property value="wheelDetail.wheelDetailID" /></td>
			<td><s:property value="wheelDetail.typesOfWheel.productName" /></td>
			<td><s:property value="wheelDetail.typesOfWheel.typeOfAuto.typeOfAutoName" /></td>
			<td><s:property value="amount" /></td>			
			
			<s:iterator value="listProductsInStocks" var="b">
			<s:set name="wheelDetailIDISt" value="%{wheelDetail.wheelDetailID}"/>
			<s:if test="#wheelDetailIDRQ.equals(#wheelDetailIDISt)">
			<td><s:property value="amount" /></td>			
			</s:if>
			</s:iterator>
			<s:iterator value="listProductsInStocks1" var="c">
			<s:set name="wheelDetailIDISt1" value="%{wheelDetail.wheelDetailID}"/>			
			<s:if test="#wheelDetailIDRQ.equals(#wheelDetailIDISt1)">
			<td><s:property value="amount" /></td>			
			</s:if>
			</s:iterator>		
			<td>			
			<s:select  name="wareHouseChose%{wheelDetail.wheelDetailID}" list="listRegion"
				listKey="regionID" listValue="regionName" cssClass="smallInput"/></td>
			<td>  <s:textfield 
				cssClass="smallInput" name= "amoutchose%{wheelDetail.wheelDetailID}" 
				value="%{amount}" /></td>					
		</tr>		
		</s:iterator>

		<tr class="footer">
			<td colspan="2">&nbsp;</td>
			<td align="right">&nbsp;</td>
			<td colspan="3" align="right"><!--  PAGINATION START  -->
			<div class="pagination"><span class="previous-off">&laquo;
			Previous</span> <span class="active">1</span> <a href="#">2</a> <a href="#">3</a>
			<a href="#">4</a> <a href="#">5</a> <a href="#" class="next">Next
			&raquo;</a></div>
			<!--  PAGINATION END  --></td>
		</tr>
	</tbody>
</table>
<ul class="form"> 
	<li class="left">&nbsp;</li>
		<li class="right">
		<s:url id="ProcessSourcingRequest2TransferRequest_11" value="/sourcingRequestByWareHouse" /> <sj:submit
			title="Trở lại" id="ProcessSourcingRequest2TransferRequest_11" href="%{ProcessSourcingRequest2TransferRequest_11}"
			button="true" value="Trở lại" targets="container"></sj:submit>
		<s:url id="ProcessSourcingRequest2TransferRequest_2" value="/ProcessSourcingRequest2TransferRequest_2" /> <sj:submit
			title="Xây dựng phiếu điều phối" id="ProcessSourcingRequest2TransferRequest_2"
			href="%{ProcessSourcingRequest2TransferRequest_2}" button="true" value="Tiếp tục"
			targets="container"></sj:submit></li>
		<li class="clr"></li>

	</ul>
	
</s:form>
</div>

</fieldset>

	
</div>
